<%= javascript_include_tag "mytable.js" %>
<%= stylesheet_link_tag 'mytable'%>
<h1>双向选择进展一览</h1>
<table>
  <%  for result in @results
    tea_id = result.tea_id
    t = Teacher.find(tea_id)
    ic = Teacher.invited_count(tea_id)
    -%>
    <tr>
      <td><strong><%= h(t.tname) %></strong></td>
      <td>类型：<%= h(result.stu_type) %></td>
      <td>名额：<%= h(result.numbers) %></td>
      <td>申请人数：<%= h(ic) %></td>
      <td>录取率：<%= decimal.Round(t / ic, 2) %></td>
    </tr>
    <tr>
      <td colspan="5"><%= h(Choice.get_choice_student_names(tea_id)) %></td>
    </tr>
  <% end -%>
</table>